package cn.liuhuan1.blogsModel.controller;


import cn.liuhuan1.entity.ReturnResult;
import cn.liuhuan1.webModelBean.api.PhotoAlbumImp;
import cn.liuhuan1.webModelBean.vo.PhotoAlbumVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/photoAlbum")
public class PhotoAlbumController {
    @Autowired
    private PhotoAlbumImp photoAlbumImp;

    @RequestMapping(value = "/getPhotoAlbum",method = RequestMethod.GET)
    @ResponseBody
    public ReturnResult getPhotoAlbum(){
        List<PhotoAlbumVo> photoAlbum = photoAlbumImp.getPhotoAlbum();
        return ReturnResult.succes(photoAlbum);
    }
}
